import xlrd
wb=xlrd.open_workbook('count应用.xls')
ws=wb.sheet_by_name('Sheet1')
n=0
while n<ws.nrows-1:
    n+=1
    s=ws.cell_value(n,1)
    print(s.count('优',s.find('\n')))
    